package com.iplatform.module.privilege.dto;

import com.iplatform.module.annotation.KeyId;
import com.iplatform.module.privilege.PriRoleBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 用户实体数据传输对象
 */
@ApiModel()
@Data
public class PriManagerDto implements Serializable {

    @KeyId
    @ApiModelProperty(value = "用户ID", dataType = "String")
    private String mgrId;

    @ApiModelProperty(value = "用户账号(不可重复)", dataType = "String",required = true)
    @NotBlank(message = "用户账号不能为空")
    private String userCode;

    @ApiModelProperty(value = "用户姓名", dataType = "String",required = true)
    @NotBlank(message = "用户姓名不能为空")
    private String mgrName;

    @ApiModelProperty(value = "用户类型(使用代码 SYS_DATA) 默认0", dataType = "String")
    @NotBlank(message = "用户类型不能为空")
    private String mgrType;

    @ApiModelProperty(value = "密码",required = true)
    @NotNull(message = "密码不能为空")
    private String password;

    @ApiModelProperty(value = "是否可用,0为不可用1为可用")
    @NotNull(message = "是否可用不能为空")
    private String stop;

    @ApiModelProperty(value = "授权类型(角色用户或权限用户,'01'为角色用户-例如:管理员，'02'为权限用户)")
    @NotNull(message = "授权类型不能为空")
    private String grantType;

    @ApiModelProperty(value = "是否为超级管理员,0不是  1是")
    private String isSuper;

    @ApiModelProperty(value = "信息状态")
    @NotNull(message = "授权类型不能为空")
    private String status;

    @ApiModelProperty(value = "信息备注", dataType = "String")
    private String remark;

    @ApiModelProperty(value = "更改人id",dataType = "String",hidden = true)
    private String updatedDt;

    @ApiModelProperty(value = "更改时间",dataType = "String",hidden = true)
    private String updatedBy;

    @ApiModelProperty(value = "创建人id",dataType = "String",hidden = true)
    private String createdDt;

    @ApiModelProperty(value = "创建时间",dataType = "String",hidden = true)
    private String createdBy;

    @ApiModelProperty(value = "删除标识,Y为已删除N为未删除", dataType = "String",hidden = true)
    private String isDeleted;

    @ApiModelProperty(value = "版本号,前端不传默认为1")
    private BigDecimal version;

    private String mail;

    @ApiModelProperty(value = "手机号", dataType = "String")
    private String mobile;

    @ApiModelProperty(value = "邮箱")
    private String eMail;

    @ApiModelProperty(value = "性别", dataType = "String")
    private String sex;

    private String fphone;

    private String address;

    @ApiModelProperty(value = "出生日期",dataType = "String")
    private String birth;

    @ApiModelProperty(value = "婚姻状况")
    private String marriage;

    @ApiModelProperty(value = "所属公司id")
    private String topParentId;

    @ApiModelProperty(value = "排序")
    private BigDecimal orderId;

    @ApiModelProperty(value = "角色ID")
    private List<String> roleIds;

    @ApiModelProperty(value = "角色")
    private List<PriRoleBean> roles;
}